package com.gupao.prototype.deep;

import com.gupao.prototype.deep.QiTianDaSheng;
import lombok.extern.slf4j.Slf4j;

@Slf4j
public class DeepTest {

    public static void main(String[] args) {
        QiTianDaSheng qiTianDaSheng = new QiTianDaSheng();
        try {
            QiTianDaSheng copy = (QiTianDaSheng) qiTianDaSheng.clone();
            log.info("原对象的属性:{}", qiTianDaSheng.getJinGuBang());
            log.info("克隆对象的属性:{}", copy.getJinGuBang());
            log.info("两个对象是否相同:{}", qiTianDaSheng.getJinGuBang() == copy.getJinGuBang());
        } catch (CloneNotSupportedException e) {
            e.printStackTrace();
        }
    }
}
